/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.control.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopes.bizz.risk.control.dto.RiskUnitEventDTO;
import com.hopes.bizz.risk.control.dto.RiskUnitEventExcelDTO;
import com.hopes.bizz.risk.control.entity.RiskUnitEventEntity;
import com.hopes.bizz.risk.control.vo.RiskUnitEventExcelVO;
import com.hopes.bizz.risk.control.vo.RiskUnitEventVO;
import com.hopes.bizz.risk.parkgis.vo.OrgLevelVO;
import com.hopes.boss.common.service.ExcelService;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 风险事件
 *
 * @author pig
 * @date 2023-07-19 16:17:44
 */
public interface RiskUnitEventService extends ExcelService<RiskUnitEventExcelDTO, RiskUnitEventExcelVO, RiskUnitEventEntity> {

    /* 分页查询 */
    Page<RiskUnitEventVO> page(Page<RiskUnitEventVO> page, RiskUnitEventDTO query);

    /**
     * 根据企业统计
     */
    Map<Long, Long> countGroupByCompany();

    /**
     * 根据企业、风险等级分类统计
     */
    List<OrgLevelVO> listGroupLevelCompany();

    /**
     * 根据id查询
     *
     * @param id id
     * @return 结果
     */
    RiskUnitEventVO getById(Serializable id);

    /**
     * 风险事件保存
     *
     * @param riskUnitEventDTO 对象
     * @return 结果
     */
    boolean save(RiskUnitEventDTO riskUnitEventDTO);


    /**
     * 风险事件保存
     *
     * @param riskUnitEventDTO 对象
     * @return 结果
     */
    boolean updateById(RiskUnitEventDTO riskUnitEventDTO);

    /**
     * 批量删除
     *
     * @param list 删除id集合
     * @return 结果
     */
    boolean removeBatchByIds(Collection<?> list);


    /**
     * 批量更新管控措施
     *
     * @param riskUnitEventDTO 对象
     * @return 结果
     */
    boolean updateControlListById(RiskUnitEventDTO riskUnitEventDTO);

    /**
     * @Description 根据uid查询
     * @Author lyb
     * @Date 2024/2/4
     **/
    RiskUnitEventEntity getByUid(String uid);
}
